home *** CD-ROM | disk | FTP | other *** search
- Path: pukrs7.puk.ac.za!pukrs12!wskdpl
- From: wskdpl@pukrs12.puk.ac.za (Dirk Laurie)
- Newsgroups: comp.lang.c
- Subject: Re: Perl-like Regular Expression Library Without Perl
- Date: 15 Apr 1996 07:31:51 GMT
- Organization: University of Potchefstroom
- Message-ID: <4ksu17$1hcc@pukrs7.puk.ac.za>
- References: <316BB394.61FB@tsc.com>
- NNTP-Posting-Host: pukrs12.puk.ac.za
- X-Newsreader: TIN [version 1.2 PL2]
-
- Glenn Goldstein (ggoldstein@tsc.com) wrote:
- > I am looking for a regular expression library for C (commercial is OK)
- > that implements Perl regular expressions. Calling Perl from C is not an
- > option; Perl will not be on the target platform <darn!>.
-
- > I have built GNU's rx and regexp. However, since I am porting a Perl
- > program to C, I would prefer not having to translate the regular
- > expressions from Perl's regexp to Emacs regexp (I am assuming that these
- > have some differences).
-
- The GNU diff utility has its own regex.c (at least, the oldish one I've
- got). This particular version allows a large number of options to be
- set at run-time, so that various different syntax versions can be
- accommodated. Default is emacs, but you can select among others the
- following:
-
- Grouping with (...) instead of \(...\) -- a similar option is
- available for several other operators
- Support the braces construct to specify upper and lower limits on
- the number of repetitions, e.g. A{2-5} means 2 to 5 A's
- Choose whether the dot should match the null byte
-
- And many more.
-
- You may find it possible to define perl regexp syntax with all these
- choices available.
-
- Dirk
-
-